<!--手机版顶部-->
<div class="mobile-header index-mobile">
    <div class="top clearfix">
        <div class="logo">
            <a href="{:U('/')}"><img src="__ROOT__{$config.site_logo}" alt="{$config.site_name}"/></a>
        </div>
        <div class="top-a">
            <a class="top-a-search" href="#"><img src="{$theme_path}/images/search-icon.jpg" alt=""/></a>
            <a href="{:U('Cart/index')}"><img src="{$theme_path}/images/shopcar-icon.jpg" alt=""/></a>
            <a href="{:U('Member/index')}"><img src="{$theme_path}/images/man-icon.jpg" alt=""/></a>
        </div>
        <div class="menu">
            <img src="{$theme_path}/images/menu.jpg" alt=""/>
        </div>
    </div>
    <!--手机版顶部下拉-->
    <div class="menu-down" style="display: none;">
        <div class="top-menu">
            <ul>
                <li><a href="{:U('/')}">首页</a></li>
                <foreach name="menu_cat" item="menu_item">
                <li><a href="{:U('GList/index',array('cid'=>$menu_item['cat_id']))}">{$menu_item.cat_name}</a></li>
                </foreach>
                <li><a href="{:U('Member/index')}">会员中心</a></li>
                <li><a href="{:U('Cart/index')}">购物车</a></li>
                <li><a href="{:U('Help/index')}">帮助中心</a></li>
            </ul>
        </div>
    </div>
    <!--手机搜索框-->
    <div class="m-search" style="display: none;">
         <input type="text" name="k" id="k" placeholder="输入关键词搜索商品" />
        <span class="m-input-search-icon" id="btn_top_search"><img src="{$theme_path}/images/search-icon.jpg" alt=""/></span>
    </div>
    <div class="m-list">
        <foreach name="menu_cat" item="menu_item">
            <a href="{:U('GList/index',array('cid'=>$menu_item['cat_id']))}">{$menu_item.cat_name}</a>
        </foreach>
    </div>
</div>


<!--电脑版顶部-->
<div class="pb-top index-pc">
    <div class="pb-top-content clearfix">
        <div class="pb-top-left">
            <p>欢迎来到方维网络商城!</p>
        </div>
        <div class="pb-top-right" id="top_login_state">
            <a href="{:U('Register/login')}">请登录</a><span>|</span><a href="{:U('Register/index')}">免费注册</a><span>|</span><a href="{:U('Member/myorder')}">我的订单</a><span>|</span><a href="{:U('Help/index')}">帮助中心</a>
        </div>
    </div>
</div>
<script type="text/javascript">
    fwshop_root = "__APP__";
    var theme_path = "{$theme_path}";//主题路径
    var url_login_back = "{:U('Register/login')}?ret="+document.location;
    var url_register_back = "{:U('Register/index')}?ret="+document.location;
    var url_top_login = "{:U('Register/top_state')}";//获取用户登陆状态地址
    var url_logout_ajax =  "{:U('Register/logout_ajax')}";//用户退出登陆地址AJAX
    var url_logout =  "{:U('Register/logout')}";//用户退出登陆地址
    var url_cart = "{:U('Cart/index')}";//购物车地址
    var url_help = "{:U('Help/index')}";//帮助中心地址
    var url_cart_num_count = "{:U('Cart/num_count')}";//获取购物车数量地址
    var url_member_index = "{:U('Member/index')}";//会员中心地址
    var url_top_search = "{:U('GList/index')}?"; //搜索地址
    var url_verify_code = "{:U('Register/verify')}?"; //获取验证码地址
    var url_forget_email = "{:U('Register/forget_email')}?"; //找回密码确定地址
    var url_forget_reset_ajax = "{:U('Register/forget_reset_ajax')}?"; //重置密码-找回密码确定地址
    var url_login = "{:U('Register/login')}?"; //用户登陆页面地址
    var url_login_submit = "{:U('Register/login_submit')}";//用户登陆请求地址
    var url_register_submit = "{:U('Register/register_submit')}";//用户注册请求地址
    get_top_login_state();//获取顶部登陆状态
</script>
